/**
 * @(#)DataIncBeanDaoImpl.java 2017年6月5日
 * Copyright(C) 2017年6月5日 ZHEXIN IT CO.,LTD. All rights reserved.
 */
package org.jsbd.boss.dao.impl;


import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.jsbd.boss.common.DataGridModel;
import org.jsbd.boss.dao.IDataIncBeanDao;
import org.jsbd.boss.domian.DataIncBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

/**
 * TODO 请加入本类的说明
 * @author <a href="mailto:zhouchao@zhexinit.com" >周超</a>
 * @version 1.0.0
 */
@Repository("dataIncBeanDao")
public class DataIncBeanDaoImpl extends CrackBaseDao implements IDataIncBeanDao {
	public static final Logger LOGGER = LoggerFactory.getLogger(DataIncBeanDaoImpl.class);

	@Override
	public List<DataIncBean> getDataIncBeanList() {
		return super.queryForList("qy_channel_data_inc.select_qy_channel_data_inc_list");
	}

	@Override
	public void updateTargetListSql(List<String> sqlList) {
		super.batchUpdate("qy_channel_data_inc.update_data_inc_sql", sqlList);
	}

	
	@Override
	public void updateDataIncBeanValue(List<DataIncBean> dataIncBeanList) {
		super.batchUpdate("qy_channel_data_inc.update_qy_channel_data_inc_value", dataIncBeanList);
	}
	
	@Override
	public void updateDataIncBean(DataIncBean dataIncBean) {
		super.update("qy_channel_data_inc.update_qy_channel_data_inc", dataIncBean);
	}
	
	@Override
	public void saveDataIncBean(DataIncBean dataInc) {
		super.insert("qy_channel_data_inc.insert_qy_channel_data_inc", dataInc);
	}

	@Override
	public Map<String, Object> getDataIncListPage(DataGridModel page, DataIncBean form) {
		form = (form == null ? new DataIncBean() : form);
		form.setPageInfo(page);
		Map<String, Object> results = new HashMap<String, Object>();
		results.put("total", super.queryForCount("qy_channel_data_inc.select_qy_channel_data_inc_page_count", form));
		results.put("rows", super.queryForList("qy_channel_data_inc.select_qy_channel_data_inc_page_list", form));
		return results;
	}

	@Override
	public void updateDataIncStatus(DataIncBean dataInc) {
		super.update("qy_channel_data_inc.update_data_inc_status", dataInc);
		
	}
	
	@Override
	public DataIncBean getDataIncBean(DataIncBean dataInc) {
		return (DataIncBean)super.queryForObject("qy_channel_data_inc.select_qy_channel_data_inc_one", dataInc);
	}
	
	
}
